<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Robots" content="all">
<meta name="HandheldFriendly" content="True">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,minimal-ui">

<meta name="screen-orientation" content="portrait">
<!--<meta name="full-screen" content="yes" />
<meta name="browsermode" content="application">

<meta name="x5-fullscreen" content="true">
<meta name="x5-orientation" content="portrait">-->
<!-- <meta name="x5-page-mode" content="app">-->
<!-- 强制让文档的宽度与设备的宽度保持1:1，并且文档最大的宽度比例是1.0，且不允许用户点击屏幕放大浏览-->
<meta name="format-detection" content="telephone=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<!-- 告诉设备忽略将页面中的数字识别为电话号码 -->
<meta http-equiv="cleartype" content="on">
<meta http-equiv="Cache-Control" content="no-cache"/>
<meta name="Keywords" content="<?php echo ($seo_keyword); ?>">
<meta name="Description" content="<?php echo ($seo_description); ?>">
<meta name="wap-font-scale" content="no">
<title>金期权</title>

<link href="/git/www/yxwei/Public/Futures/css/main.css" rel="stylesheet">
<link href="/git/www/yxwei/Public/Futures/css/index.css" rel="stylesheet">
<link href="/git/www/yxwei/Public/Futures/css/personal.css" rel="stylesheet">
<link href="/git/www/yxwei/Public/Futures/css/left.css" rel="stylesheet">
<script type="text/javascript" src="/git/www/yxwei/Public/Futures/js/jquery.js"></script>
<script type="text/javascript" src="/git/www/yxwei/Public/Futures/js/highcharts.js"></script>
<link href="/git/www/yxwei/Public/Futures/css/Swiper.min.css" rel="stylesheet">
<script type="text/javascript" src="/git/www/yxwei/Public/Futures/js/swiper.min.js"></script>
<?php echo hook('weixinshare',array('title'=>'金期权交易平台~','link'=>"$share_url",'desc'=>'我在金期权交易平台盈利，快来一起参与吧！','imgUrl'=>"$headimgurl",'type'=>'','dataUrl'=>'','success_fun'=>'callback'));?>
<script type="text/javascript">
    function callback(){
        //alert('分享回调');
         /*
         $.post("<?php echo U('Index/share');?>",{},function(data){
             if(data.status==0){
                //alert(data.mes);
             }else{
                //alert('分享成功');
             }
         },'json')
         */
    }
</script>
<!-- 页面header钩子，一般用于加载插件CSS文件和代码 -->


</head>
<body>
	<!-- 头部 -->
	<!---->
	<!-- /头部 -->
	
	<!-- 主体 -->
	
	<div class="container">
		<div class="nav">
		    <img src="/git/www/yxwei/Public/Futures/images/img_1.png" alt="" id="show">			
			<h3>订单列表</h3>
		</div>
		<!--<ul class="order">
			<li><span>交易日期</span><span>商品名称</span><span>方向</span><span>当前价格</span><span>盈利</span><span>操作</span></li>
			 <?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li>
			 		<span><?php echo ($vo["create_time"]); ?></span>
			 		<span><?php echo ($vo["name"]); ?></span>
			 		<span><?php echo ($vo["number_direction"]); ?></span>
			 		<span><?php echo ($vo["last_price"]); ?></span>
			 		<span><?php echo ($vo["profit"]); ?></span>
			 		<?php if($vo['status'] == 1): ?><span>平仓</span>
			 		<?php else: ?>
			 		<span></span><?php endif; ?>
			 		</li><?php endforeach; endif; else: echo "" ;endif; ?>
		</ul>-->
		
		
		<ul class="order">
			<li>
				<span class="order-span1">交割日期</span>
				<span class="order-span2">商品名称</span>
				<span class="order-span3">方向</span>
				<span class="order-span4">盈利</span>
				<span class="order-span5">操作</span>
			</li>
			 <?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li><span class="order-span1"><?php echo ($vo["create_time"]); ?></span>
				<span class="order-span2"><?php echo ($vo["name"]); ?></span>
				<span class="order-span3"><?php echo ($vo["number_direction"]); ?></span>
				<span class="order-span4"><?php echo ($vo["profit"]); ?></span>
				<span class="order-span5">
					<a class="order-a" data-click=0 href="javscript:void(0)">详情</a>
				</span>
				<div class="order-maos">
					<table class="order-table">
						<tr>
							<td>状态</td>
							<td>买入价格</td>
							<td>最新价格</td>
							<td></td>
						</tr>
						<tr>
							<td><?php if($vo['status'] == 1): ?>进行中<?php else: ?>等待中<?php endif; ?></td>
							<td><?php echo ($vo["open_price"]); ?></td>
							<td><?php echo ($vo["last_price"]); ?></td>
							<!-- <td>
								<?php if($vo['status'] == 1): if($vo['authority_status'] == 1): ?><a class="order-a" href="javascript:sub_form(<?php echo ($vo["id"]); ?>,<?php echo ($vo["last_price"]); ?>)">平仓</a><?php endif; endif; ?>	
							</td> -->
						</tr>
						
					</table>
				</div>
			</li><?php endforeach; endif; else: echo "" ;endif; ?>
		</ul>
		
		<!--弹出开始-->
		<div class="dailog_mask"></div>
		<div class="order-mode" data-id=''>
			<div class="order-modediv">
				平仓价
				<img class="order-modeimg" src="/git/www/yxwei/Public/Futures/images/img_22.png" />
			</div>
			<input type="hidden" id="id" name="id" value="">
			<input class="order-modeinput" name="price" id="price" value="" type="text" pattern="[0-9]*" disabled/>
			<p class="order-p">ddd</p>
			<a class="order-modea" id="sub_form_two" href="javascript:sub_form_two()" >确认</a>
		</div>
		<!--弹出结束-->
		
		
		
		<!--翻页  开始-->
		<div class="flip-pag">
		<?php echo ($page); ?>
		<!--翻页 结束-->
		
		
	</div>

<script type="text/javascript">
//平仓提交
function sub_form(id,price){
	$('#id').val(id);
	$('#price').val(price);
}
function sub_form_two(){
	$('#sub_form_two').attr('href','javascript:void(0)');
	$('#sub_form_two').css('background-color','#bab8b6');
	var id=$('#id').val();
	var price=$('#price').val();
	var url_href="<?php echo U('Order/order_unwind');?>";
	$.post(
		url_href,
		{
			id:id,
			price:price,
		},
		function(data){
			if(data.status){
				//alert(data.msg);
				$('.order-p').show();
				$('.order-p').html(data.msg);
				setTimeout(link_url,1000);
			}else{
				$('.order-p').show();
			 	$('.order-p').html(data.msg);
			 	setTimeout(link_url,1000);
			}
		}
		,'JSON')
}
function link_url(){
	window.location.reload();		
}
//平仓弹窗
$('.order-table').find('.order-a').each(function(){
	$(this).click(function(){
		$('.dailog_mask').toggle();
		$('.order-mode').toggle().attr('data-id',$(this).attr('data-id'));
	});
})
$('.dailog_mask').click(function(){
	$('.order-mode').toggle();
	$(this).toggle();
})
$('.order-modeimg').click(function(){
	$('.order-mode').toggle();
	$('.dailog_mask').toggle();
})


//点击展开详情
$('.order-span5').find('.order-a').each(function(){
	$(this).click(function(){
		var clik=$(this).attr('data-click');
		if(clik==0){

			$(this).parent().parent().find('.order-maos').css('display','block')
			$(this).css('background','#4c535e');
			$(this).html('关闭');
			$(this).attr('data-click','1');
		}else{
			$(this).parent().parent().find('.order-maos').css('display','none')
			$(this).css('background','#de362a');
			$(this).html('详情');
			$(this).attr('data-click','0');
		}
			
	})
})








//翻页  开始
        //翻页  开始
$('.flip-import').click(function(){
    $(this).css('display','none');
    $('.flip-input').css('display','inline-block');
    $('.flip-input').focus();
})
$('.flip-go').click(function(){
    var page = $('.flip-input').val();
    window.location.href="<?php echo ($url); ?>"+"/p/"+page;
    $('.flip-input').css('display','none');
    $('.flip-import').css('display','inline-block');
   
})
//翻页  结束

</script>

	<!-- /主体 -->

	<!-- Left -->
	
	
<div class="left-layer"></div>

<div class="left-box">
	<div class="left-positi">
	<div class="left-img left-border">
		<!--
		<img src="/git/www/yxwei/Public/Futures/images/saber.png"/>
		-->
		<img src="<?php echo ($headimgurl); ?>">
	</div>
	<ul>
		<li class="left-list left-border"><a href="<?php echo U('Index/index');?>"><img class="left-icon" src="/git/www/yxwei/Public/Futures/images/icon01.png" /><span class="left-span">首页</span></a></li>
		<li class="left-list left-border"><a href="<?php echo U('StockOption/index');?>"><img class="left-icon" src="/git/www/yxwei/Public/Futures/images/icon23.png" /><span class="left-span">恒指期权</span></a></li>
		<li class="left-list left-border"><a href="<?php echo U('Pay/personal_incharge');?>"><img class="left-icon" src="/git/www/yxwei/Public/Futures/images/icon02.png" /><span class="left-span">充值</span></a></li>
		<li class="left-list left-border"><a href="<?php echo U('User/bank_index');?>"><img class="left-icon" src="/git/www/yxwei/Public/Futures/images/icon03.png" /><span class="left-span">提现</span></a></li>
		<li class="left-list left-border"><a href="<?php echo U('Transaction/index');?>"><img class="left-icon" src="/git/www/yxwei/Public/Futures/images/icon04.png" /><span class="left-span">交易历史</span></a></li>
		<li class="left-list left-border"><a href="<?php echo U('Order/order_list');?>"><img class="left-icon" src="/git/www/yxwei/Public/Futures/images/icon04.png" /><span class="left-span">订单列表</span></a></li>
		<!-- <li class="left-list left-border"><a href="#"><img class="left-icon" src="/git/www/yxwei/Public/Futures/images/icon04.png" /><span class="left-span">排行榜</span></a></li> -->
		<li class="left-list left-border"><a href="<?php echo U('Payments/payments');?>"><img class="left-icon" src="/git/www/yxwei/Public/Futures/images/icon05.png" /><span class="left-span">收支明细</span></a></li>
		<li class="left-list left-border"><a href="<?php echo U('User/user_info');?>"><img class="left-icon" src="/git/www/yxwei/Public/Futures/images/icon06.png" /><span class="left-span">个人信息</span></a></li>
		<?php if($is_agent == 1): ?><li class="left-list left-border"><a href="<?php echo U('Commission/index');?>"><img class="left-icon" src="/git/www/yxwei/Public/Futures/images/icon22.png" /><span class="left-span">分销中心</span></a></li><?php endif; ?>
		<?php if($is_agent == 0): ?><li class="left-list left-border"><a href="<?php echo U('Apply/index');?>"><img class="left-icon" src="/git/www/yxwei/Public/Futures/images/icon22.png" /><span class="left-span">分销中心</span></a></li><?php endif; ?>
       <!--  <li class="left-list left-border"><a href="<?php echo U('Commission/index');?>"><img class="left-icon" src="/git/www/yxwei/Public/Futures/images/icon22.png" /><span class="left-span">分销中心</span></a></li> -->
	</ul>
	</div>
</div>
<!--没注册提示框-->
<div class="left-tips">
	<p class="left-tipsp1">注册</p>
	<p class="left-tipsp2">您还没有注册,请先注册!</p>
	<div class="left-tipsdiv">
		<a class="left-tipsa1" href="#">取消</a>
		<a class="left-tipsa2" href="#">确定</a>
	</div>
</div>

<!--未登录提示-->
<!-- <div class="container" style="display: <?php echo ($hasPwd); ?>;">
	<div class="dailog_mask" style="display: block;"></div>
	<div class="index-mask" style="display: block;">

		<div class="no_loginbox">
			<p class="nologin_title">交易密码</p>
			<p class="nologin_pwd"></p>
			<input type="password" name="futures_pwd" id="futures_pwd" value="" placeholder="密码" class="pwd_input"/>
		</div>
		<div class="nologin_sub clearfix">
			<a href="<?php echo U('User/find_pwd');?>" class="sub_findpwd">找回密码</a>
			<a href="javascript:void(0);" class="sub_login" onclick="pwd_login();">确认</a>		
		</div>
		
</div> -->

<script type="text/javascript">
$("a").attr('data-ajax',false);
$('.flip-go').css('float','left')

$('#show').click(function(){
		$('.left-layer').toggle();
		$('.left-box').toggle();
//		move('left-box');
})
$('.left-layer').click(function(e){	
	e.stopPropagation;
	$('.left-layer').toggle();
	$('.left-box').toggle();
})

/**
 * [input_pwd 交易密码登录]
 * @return {[type]} [description]
 */
function pwd_login(){
	//获取输入的交易
	var pwd = $('#futures_pwd').val();
	if(pwd==''){
		$(".nologin_pwd").html('请输入交易密码！');
		return;
	}
	var url="<?php echo U('User/pwd_login');?>";
    $.post(url,{pwd:pwd},function(data){
        if(data.status){
        	$(".nologin_pwd").html('成功！');
           	window.location.href="<?php echo U('Index/index');?>";
        }else{       
            $(".nologin_pwd").html(data.info);
        }
    },'json')        
}
</script>

	
	<!-- /Left -->

	<!-- 底部 -->
	<!---->
	<!-- /底部 -->
</body>
</html>